
;(function (){
   
    const line=document.querySelector('.line .home')
    line.addEventListener('click',()=>{
    
        location.href='../html/header.html'
    })
    const ton=document.querySelector('.vacant .continue button')
    ton.addEventListener('click',()=>{
        location.href='../html/header.html'
    })
    const set=document.querySelector('.settlement')
    set.addEventListener('click',()=>{
        location.href='../html/goodsPay.html'
    })

const allA = this.document.querySelectorAll('.bigcircle ')
let index = 0
const constance = document.querySelector('.exhibit1')
const incorrect = document.querySelector('#next')
const wrong = document.querySelector('#prve')


incorrect.addEventListener('click', function () {
    index++
    console.log('aaa')
    document.querySelector('.exhibit .min').style.left = -constance.offsetWidth * 5 * index + 80 * index + 'px'
    if (index > 3) {
        document.querySelector('.exhibit .min').style.left = -26 + 'px'
        index = 0
    }
    document.querySelector('.bigcircle.highlight').classList.remove('highlight')
    allA[index].classList.add('highlight')

})

wrong.addEventListener('click', function () {
    index++
    console.log('aaa')
    document.querySelector('.exhibit .min').style.left = -constance.offsetWidth * 5 * index +80* index + 'px'
    if (index > 3) {
        document.querySelector('.exhibit .min').style.left = -26+ 'px'
        index = 0
    }
    document.querySelector('.bigcircle.highlight').classList.remove('highlight')
    allA[index].classList.add('highlight')
})
    }())
    

